Midnight data bugfix

Fixes the issue of data not being changed when the hour is set to 0:00.

Added a generic functions module, where we can add utility functions to angular.
Added a functions that checks whether a value is null or undefined.