more error checks for mdls