Check if the WP_Scripts object exists before doing anything