avoid null pointer if receiving junk