After this statement i am getting error..
Solution:
Make sure you added
<script type="text/javascript" src="/_layouts/sp.core.js"></script> <script type="text/javascript" src="/_layouts/sp.js"></script> <script type="text/javascript" src="/_layouts/SP.UI.Dialog.js"></script> <script type="text/javascript" src="/_layouts/sp.runtime.js"></script> <script type="text/javascript" src="/_layouts/SP.Taxonomy.js"></script>