Added a nil check for types property returned by Google