Fix race condition that threw an exception in ProcessCache when getNameOfPid:isForeground returned nil.