Because we need to care about the result, not the source.

Also adds a couple of null checks, just to be safe.