Compiling getValueFromMap1 should give compilation warning. Type erasure when compiling to Java bytecode means that generic parameters are erased to java.lang.Object (unless they have upper bounds, in which case they are erased to upper bounds). When compiler sees case (value: T) but there is no class Manifest nor ClassTag in scope for type T then it is equivalent to case (value: Any). You can add automatically generated ClassTag by introducing type bounds, i.e. changing [T] to [T: ClassTag].
Checking if some value has type equal to generic parameter is generally an unpopular thing (except perhaps in C#, but I don’t care about that language) and also rather unfavourable as it moves type checking from compile time to runtime. Instead of doing the compiler’s job manually, use Scala’s powerful type system.