Minor bugfix in sanitize_custom_domain to deal with nil custom_domain input