Added a type safe condition