clean up - extracted hasPlaceholder to a function.