I resolved this by putting if/else statements with the variables that were missing and setting the values to 0 or null if the key-value pair was missing.
This is the URL I used to return Stack Overflow's top twenty users sorted by reputation and listing only their name, age and location: