check_dprimary function

Check if a function is a valid bounded probability density function (PDF)