check return value for null
remove debug print from tests