Added extra check for WordPress database stored queries