Write a function which takes a dictionary and another argument, d and a, and returns the value for the key a if it exists, otherwise it returns None.