Use is_multipart() instead of get_content_maintype to check if multipart. Also add a TODO note...