Added explicit error flag for null-value errors