check_corr_thresh function

check that corr_thresh is either NULL or a number between 0 and 1