adding param checks for None all over the place; +tests