elegant isvalid