From a comment on one of my answers: "An illusion isn't a creature so Magic Missile can't target it. RAW doesn't say what happens if you try to cast a spell with an improper target but the RAI is that if the spell doesn't involve an attack roll or an area, the spell doesn't go off."
This is weird and surprising. I would have expected that, if a wizard tries to cast a spell with an invalid target, the spell would be lost.
(Side question: if a wizard is worried about mimics, can the wizard attempt to cast magic missile on furniture, knowing the spell will usually not be lost?)
The link above goes to a tweet which goes to another tweet which goes to a WotC page which goes to a 90-minute podcast. Has anyone got a better source for this answer?