Add empty check to unit test