Check internet connectivity before combining local and remote records to avoid
a null exception