The following Exception is thrown when I try to add an object Maybe I misunderstand how functions work. I couldn\'t find something helpful in documentation too