handling null external storage directory