Fixed the isValid method so that I'm using the namespaced functioin.