Only require UID match if UID is provided