removing redundant nil check