Use the isValid node (the one which has a question mark on next to name). Only do stuff if it returns true.