Magic missile does not hit at all; it is not auto-hit. It just deals damage as an effect, which does not count as hitting the target. Since MM does not make an attack roll, it can neither hit nor miss.
You do need line of effect for MM, but line of effect does not require line of sight...