Throw if entity argument is wrong type