hasKey() function

add a function to check if the given key exists