Check if primary url exists

Some profiles might not have set a primary url (mine doesn't), so better check for it first.