My recommendation would be to do those kinds of checks externally rather than adding them to the function. Changes for convenience will slow things down when it's not convenient. It's built to do just one thing as fast as possible.
--Jeff Moden
Change is inevitable... Change for the better is not.