remove unnecessary nil check