Fixed nil check.