Karma / Jasmine Testing

Completed implementation of testing using Jasmine Testing Suite and Karma Runner.
Improved handling of undefined and null values.

Signed-off-by: Jonathan Clerck <j.m.clerck@icloud.com>