Type checking for functions modified, included different types for different kinds of header values