(Hopefully) fixed checking for the validity of a poll object