Removed null check and test case