Null pointer bug fix at scholar queries view