updated model null checking