Feature emval improvements

As discussed in issue #2925, here is the proposed patch for discussed improvements.

Let's shoot remarks ;-)
As below, you can avoid the __emval_register if you just return a bool.