Added checks for script and style enqueue.