Since this returns a bool, I think it would be better renamed to is_valid (bool returning functions should usually be named as is_foo has_bar)