Add context to exists helper

Checks the existence of an element within the context if provided.