use if(TARGET) to test if target exists instead of searching for a property