Fixed taskController for search by date (null pointer exception)