fix check for a required and boolean type