EDIT: As clarified in the answers below, this appears to be a bug with amsmath and colon and thus doesn't really have anything to do with mathrm versus operatorname.
This question contains an enlightening discussion between using \mathrm and \operatorname. The tl;dr version is: whenever you have an operator, use \operatorname.
However it seems bad to use \operatorname if what you are defining is a set, since in general \operatorname adds a little space before it. This means that an expression like:
f \colon \operatorname{End}(V) \to \mathbb{R}
renders badly, as there is too much white space between the colon and the operatorname{End}. Using \mathrm (the RHS) is more visually appealing:

Thus if one views \operatorname{End}(V) as a set, then it makes more sense to write \mathrm{End}(V).
Now one can view \operatorname{End} also a functor on the category of vector spaces, for instance, then you would want the \operatorname:

My question is this: What is the best practice when dealing with a quantity that is used both as a set and an operator? Should one really switch between \mathrm and \operatorname as appropriate? Or is there a better option.

\colonmade by theamsmathpackage. Edit: Oh, by the way, welcome to TeX.SX! (:-) – GuM Nov 24 '18 at 10:55amsopnthere is no difference in the output – Andrew Swann Nov 24 '18 at 10:57