incase of invalid character return false