3.0 - Improve cell/element error handling

This fixes the problems described in #3664. I've also converted missing element errors into exceptions, and cleaned up some dead code.
I don't think exposing error messages even in production is a good idea. I would just return empty and convert this to a trigger_error