sanity checking on inputs.