Conditionally run tasks if files are present or not.  This fixes the issues where js tasks would behave unexpectedly (fail, create empy 'app.js' files, etc) when given empty directories, by checking that there are js files to process before running the task.  For this exact reason tasks should be preferred over running the grunt commands directly.