need to check for null, otherwise it will throw error on first run when using instance mode
class is reserved word in JavaScript standard
run grunt
merging pr for null check on mouse coords update