Sample Code:
if ( CustomSettingsName__c.getValues(UserInfo.getUserId()) != null ) {
//do something since it contains the user id
}
Cheers!!!