check for null redirectUri to prevent NullReferenceException and throw a better error
Merge pull request #543 from feinoujc/master

check for null redirectUri