Update condition to check for attached file to E-ail Template, initial Commit doesn't check for if null (may generate fatal error depending on context), now we check if is an object, before checking if we join files.