Added type check (causing error with boolean value).