Defensive coding to protect against invalid Facebook accounts