check defined before processing results