ActiveNetworkInfo NullException

ActiveNetworkInfo is null when the device is not connected to any network