> wouldn't both of these methods require checking edge cases where the split()[0] is always safe?

Well, I don't think this makes a difference, but please give me an example if you think there is an edge case :)

What I dislike with "split" is that it always parses the whole string, whereas here we don't need it. I'm always reluctant doing more code than necessary. In the normal case, this won't make much difference but remember that this content comes from outside and we don't want our phone to choke because someone sent us a MMS with a type of several kilobytes.

That said, we should probably also check if the type length is not larger than like 256 characters (this is arbitrary) and do something appropriate if it is. You should also check for the very existence of this property (and probably other properties too) before calling something on it.