Is there a reason that this is an elif instead of an else? What if content_type is None?