Add null checks on driver PDO statement

php5 makes all methods do nothing if there is no backing driver PDO statement