Turns out this (object) cast is not necessary.