Formatting fixed
diff --git a/parsemail.go b/parsemail.go
index 9b40f1c..0580481 100644
--- a/parsemail.go
+++ b/parsemail.go
@@ -201,6 +201,9 @@
 		}
 
 		contentType, params, err := mime.ParseMediaType(part.Header.Get("Content-Type"))
+		if err != nil {
+			return textBody, htmlBody, embeddedFiles, err
+		}
 
 		switch contentType {
 		case contentTypeTextPlain: