fix nullpointer in BaseDao