add rudimentary type checking on function inputs