added more input type checks to DAFT::prepareData