Fixing nil check.