check view not null in ctor