added new properties to makeReference class and a function to check for input errors based on type