Some checks added for checking wifi status and non null values