added one checker before calling _is_valid