Fixing check for undefined users