Prevent null point errors