fix npe in clusterMasterNodeExpression

masterNodeId can be null for example if there aren't enough
nodes to form a cluster due to the minimum_master_nodes
setting