public function areSameType($key, $otherValue) { $value = $this->theGameRules[$key]; return $value != null && gettype($value) == gettype($otherValue); }