fix type checking & better errors