fix #135 undefined element in view

added a check when creating a view with an undefined element,
we now log an error.

close #135