Bugfix to address issue#12. Corrected incorrect usage of hasmapto() function used to check for pre-existing maps