Optimize preg_match() pattern in is_write_type()

one \s is enough