adding exception handler during parsing
checking url for undefined