Convenience method for validating optional input.