Android null check to avoid exception.