Ensure that empty array is stripped in getAccessToken

This maintains the previous behaviour where an uninitialised access token
would return null.

Address #180