Convert type for is_valid_ functions to bool