Convient error check.