Added some error checking for google api