add check for param to getDateFromParam