Modified setAttribute to be lazy as well, and only actually set attributes if we actually have a PDO object.