refactor: factor out inputs type check