Use the is_valid method