Updated getUser APIs: return null if uid is specified but user not found