Add is_valid method

Update docs to match