Sanity checking clamp functions.