Add conditional check