Fix visibility of valid? method