error check.