Proper check of scope variable type