added pdo null param and close wrapper