PS. I could just as easily do float(...valid...) if you think that would be more clear.