only build payload query for valid values
only build payload query for valid values

Invalid or empty string could break discourse SSO, especially the empty avatar_url would break when discourse will try to fetch images .
laurelandwolf/discourse_sso