This method is used to check weather WI-Fi is connected or not.
If internet connected then method will return true or false.