Ensure that the pbm is not None

Ensure that the cookie is correctly set.

Change-Id: I65e75306fe8470030b97268395c062001aaed6fc
Merge "Ensure that the pbm is not None"