Added documentation of return value for is_valid