Update src/app/tasks.coffee

20/02/13 Added a check for undefined value, more at https://github.com/lefnire/habitrpg/issues/463 -lancemanfv