added null check for wakelock stats