Add null string check and remove unused test class