Adding very basic null and empty string checks and corresponding unit tests