Update gapslib.py

It prevents the crash of gaps when "mail" is empty

if "mail" in r: