Added error-handling for calling primitive procedures with incorrect arguments