add typeof to foursquare init to prevent js crashing