correct handling of nil;