There is a way to tell if the angel appearing to Muhammed was of God or not. What if he wasn't from God? Some believe the story was made up, but what if a man named Muhammed met an angel. How could we discern if the angel was from God? A single verse would declare this to the world.
Hebrews 1:6
And again, when he bringeth in the firstbegotten into the world, he saith, And let all the angels of God worship him.
All angels of God were commanded to worship Jesus. An angel refusing would not be from the Father. Since muslims refuse to worship Jesus it is obvious the angel wasn't a good Godly angel. He was an imposter I would say.