Task unit tests and null checks