sanity checks for lm and glm