I think this would do :
if ( is_page( 'element1.php' ) || is_404() ) {
// do that if page is using template page element1.php or is 404
}
I think this would do :
if ( is_page( 'element1.php' ) || is_404() ) {
// do that if page is using template page element1.php or is 404
}