Minor null checking